<?php /* Smarty version Smarty-3.0.6, created on 2015-02-21 20:07:28
         compiled from ".\templates\viewproducts.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2206154e8d770250b95-56519736%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9efa9b8bdb9ae7893ad6db28ac131a205888a1b2' => 
    array (
      0 => '.\\templates\\viewproducts.tpl',
      1 => 1424545642,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2206154e8d770250b95-56519736',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?> 

<script type="text/javascript">
      
            $(document).ready(function() {
            	var numitems =  $("#myList li").length;

            	$("ul#myList").css("column-count",Math.round(numitems/2));
            	});
        </script>
<style>
ul {
	width: 900px;
}

li {
	margin-top: 10px;
	margin-right: 10px;
	display: inline-block;
}
</style>

<center>

	<ul id="myList">
		<?php  $_smarty_tpl->tpl_vars['category'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('shop')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['category']->key => $_smarty_tpl->tpl_vars['category']->value){
?>
		<li
			style="border: 2px solid #a1a1a1; background-color: lightgreen; text-align: center;"
			height="200px" width="200px"><a
			href="index.php?cat=<?php echo $_smarty_tpl->tpl_vars['category']->value['category_id'];?>
"> <img src="images/1.jpg"
				style="margin: 10px;" height="180px" width="180px" />

				<h4><?php echo $_smarty_tpl->tpl_vars['category']->value['category_name'];?>
</h4>
		</a>
		</li> <?php }} ?>
		</ul>
</center>



 <?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
